View.vue
<template>
  <h1>下拉选框组件</h1>
  <el-select v-model="city" style="width:500px" placeholder="请选择您的城市">
    <el-option value="北京" label="北京"></el-option>
    <el-option value="上海" label="上海"></el-option>
    <el-option value="广州" label="广州"></el-option>
    <el-option value="深圳" label="深圳"></el-option>
  </el-select>
  <h4>您选择的城市为:{{city}}</h4>
</template>

<script setup>
  import {ref} from "vue";

  const city = ref('');
</script>

<style scoped>

</style>